package cn.snowheart.observer.weather.jvm.display;

import java.util.Observable;
import java.util.Observer;

/**
 * @author liuwanxiang
 * @version 2019/06/24
 */
public class ForecastDisplay implements Observer, DisplayElement {

    private int data;

    @Override
    public void display() {
        System.out.println("show forecast data..." + data);
    }

    @Override
    public void update(Observable o, Object arg) {
        this.data = (int) arg;
        display();
    }
}
